package cn.cupk.corporateshuttlemanagesystem.mapper;

import cn.cupk.corporateshuttlemanagesystem.pojo.UserCancelStats;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserCancelStatsMapper {

    @Select("select * from usercancelstats where user_id = #{userId}")
    UserCancelStats selectByUserId(String userId);

    @Update("update usercancelstats set cancel_count = #{cancelCount} where user_id = #{userId}")
    void update(UserCancelStats stats);

    @Insert("insert into usercancelstats(user_id, cancel_count) values(#{userId}, #{cancelCount})")
    void insert(UserCancelStats stats);
}
